package com.shigi;

import com.shigi.sat.SatLoader;
import com.shigi.sat.SatProblem;
import com.shigi.sat.SatProblemInitializer;
import com.shigi.sat.ga.GAConfig;
import com.shigi.sat.ga.GASolver;

public class Main {

    public static void main(String[] args) {
        //KnapsackProblem knapsackProblem = new KnapsackProblem(new BruteForce());
        //KnapsackProblem knapsackProblem = new KnapsackProblem(new BasicHeuristic());
        //KnapsackProblem knapsackProblem = new KnapsackProblem(new BranchBound());
        /*KnapsackProblem knapsackProblem = new KnapsackProblem(new DynamicProgrammingValue());*/
        //KnapsackProblem knapsackProblem = new KnapsackProblem(new FPTAS(0.2));

        /*knapsackProblem.solve();

        //String numOfGenerations, numOfIndividuals, String probOfCrossover, String probOfReproduction, String selectPressureParam
        GAConfig gaConfig =
                new GAConfig(Integer.parseInt(args[0]), Integer.parseInt(args[1]), Double.parseDouble(args[2]), Double.parseDouble(args[3]), Double.parseDouble(args[4]), Double.parseDouble(args[5]), Integer.parseInt(args[6]));
        GAMain gaMain = new GAMain(gaConfig, knapsackProblem.getKnapsackInstances() , knapsackProblem.getKnapsackSolutions());
        gaMain.execute();*/

        //numOfGenerations, numOfIndividuals, probOfCrossover, probOfReproduction, selectPressureParam, probOfMutation, probOfInitValue, numOfIterations
        GAConfig gaConfig =
                new GAConfig(Integer.parseInt(args[0]), Integer.parseInt(args[1]), Double.parseDouble(args[2]), Double.parseDouble(args[3]), Double.parseDouble(args[4]), Double.parseDouble(args[5]), Double.parseDouble(args[6]), Integer.parseInt(args[7]));
        SatProblem satProblem = SatProblemInitializer.initializeSatProblem(gaConfig);
        satProblem.solve();
    }
}
